Serving Documents from Mac Applications
In addition to serving documents like HTML and GIF files, MacHTTP can
serve documents from many other types of Mac applications with a few
caveats:
* Documents must contain all of their data in the data fork of the
Mac file.
* Suffix mappings must be defined for the documents that cause them
to be sent as binary files (more below).
* The documents will not be viewable by users on other machines that
don't possess applications capable of reading the Mac files.
Configuring MacHTTP to Serve Mac Documents
There is only one real configuration issue on the MacHTTP side of
things to contend with. You must make sure your Mac documents (e.g,
Word, Excel) are named with a suffix that is defined in the
MacHTTP.config file as BINARY. You are limited to only 10 suffix
definitions, so you may need to redefine some that you aren't using.
Here's an example. Suppose you have an Excel spreadsheet file called
"BigBucks.xcl". You must make sure that there is an entry in the
MacHTTP.config file that looks like:
BINARY .xcl
This tells MacHTTP to transfer files with names ending in ".xcl" to
the WWW client without any modifications.
Configuring your WWW client is the next step. If you are using Mac
Mosaic, you need to define a file name extension mapping that maps the
".xcl" suffix into a specific MIME type and "Helper Application." Once
you've done this, selecting a URL like
http://your.machttp.host/BigBucks.xcl will cause MacHTTP to send the
Excel file as a binary file. Mac Mosaic will map the ".xcl" extension
into whatever MIME type you've defined, and then map the document type
into a specific application (i.e. Excel) that will be run to view the
document.
Note that ".xcl" was chosen randomly for this example. You may define
whatever suffix seems most appropriate as long as it doesn't conflict
with existing extensions defined by Mosaic.